import { createRouter, createWebHistory, RouteRecordRaw,createWebHashHistory } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    redirect:'/home'
  },
  {
    path: '/home',
    component: () => import('../pages/MyHome/index.vue')
  },
  {
    path: '/cart',
    component: () => import('../pages/MyCart/index.vue')
  },
  {
    path: '/me',
    component: () => import('../pages/MyMessage/index.vue')
  },
  {
    path: '/order',
    component: () => import('../pages/MyOrder/index.vue')
  },
  {
    path: '/store',
    component: () => import('../pages/MyStore/index.vue')
  }
]

const router = createRouter({
  history: createWebHashHistory(process.env.BASE_URL),
  routes
})

export default router
